The video signal on each scan line used for Teletext has a fixed format so that a decoder can recognise and decode it:
Volts .462+ .CCF##########################. logic 1 | |CCF##########################| | |CCF##########################| | |CCF##########################| | .#####. |CCF##########################| 0+---. .-#######-----'CCF##########################`---. .- logic 0 | | | `#####' | | | `--' `--' +---+------------------+---------------------------+----Time 0 12 46 us Line Colour Clock run-in C=10101010 Sync Burst Framing pattern F=11100100 Pulse MPAG, 40-byte DataBits are coded as binary non-return-to-zero (NRZ) in a negative modulation system at 6.9375Mbit/s; that is, each bit is represented by a dot 144.44ns long; black for a zero and white for a one (60--72% of peak white).
The data begin with a fixed framing pattern: ``10101010 10101010 11100100''. This pattern is chosen so that the receiver's clock can be synchronised during the first sixteen bits and the position of byte boundaries unambiguously defined by the last eight bits. The penultimate 1 of the clock run-in should be 12us after the leading edge of sync. After this comes a two-byte Magazine and Packet Address Group (MPAG), then 40 bytes of data.
Each packet belongs to one of 8 magazines, identified by 3 bits in the packet address. These magazines are independent of each other, so in effect, there are eight independent teletext services operating simultaneously. The magazine number is the first digit of the three-digit page number you type in on your teletext TV.
Each packet also has an associated 5-bit packet number (which used to be called row number when all packets corresponded directly with displayed rows). This value determines the meaning and format of the remaining 40 bytes of the packet. Packet number 0 is the page header, numbers 1 to 25 are display lines and 26 to 31 carry non-displayable data. Packets 30 and 31 do not belong to a page or magazine.
The magazine and packet numbers are coded in a single byte, then that byte is hammed to protect against reception errors, yielding the two-byte Magazine and Packet Address Group (MPAG).
A normal teletext page consists of a sequence of packets, all in the same magazine. These packets can be interleaved with packets from other magazines.
The page and sub-page numbers are both treated as hex numbers, so page number 12 is represented as 0x12. A sub-page of zero means there are no sub-pages. Although most TVs don't let you enter them, page numbers with digit values 0xA to 0xF are possible. Such "hidden" pages can be referenced using Fastext links, like Channel 4's PDC and engineering information magazine/page 3AA which can be reached by the red Fastext link from magazine/page 399. Page code 0xFF indicates a dummy packet which can be used to fill in gaps in transmission. Sub-page numbers are represented as hex, but with the 1st, 2nd and 9th most significant bits not used. This was designed so decimal times 0000 to 2359 will fit. The three spare bits are used here to code the ``Subtitle'', ``Newsflash'' and ``Erase'' flags. Sub-page code 0x3F7F is reserved for special purposes.
The remaining flags are called ``Suppress header'', ``Update'', ``Interrupted Sequence'', ``Inhibit Display'' and ``Magazine Serial''. There are also three control bits which can be used to select one of 8 national character sets. All 8 sets share the same basic 83 characters but modify the remaining 13 characters (23=# 24=$ 40=@ 5B=[ 5C=\ 5D=] 5E=^ 5F=_ 60=` 7B={ 7C=| 7D=} 7E=~). Unfortunately, there are more National options defined than there are bits to represent them, so the right decoders must be used in the right region:
Control National Bits Character Option 000 English or Polish 001 German 010 Swedish 011 Italian 100 French 101 Spanish or Serbo-croat 110 Turkish or Czechoslovakia 111 Rumanian
Between the first and the next packet 0s, packets in the same magazine hold display and other data for the teletext page specified by the first packet 0.
If more than 13 triplets are needed to describe all the programmes on a single TV listings page, then several packet 26s are transmitted on the same page. These supplementary packets have successive sequence numbers.
The first four links of the packet 27/0 are used for the four Fastext buttons. The fifth is not accessible to the user, but may be used by the broadcaster to suggest pages that are worth caching to a Teletext receiver with memory. The sixth is for the Fastext Index button. The 38th nibble is the Link Control Byte, which should be set to 1 if packet 24 should be displayed as the user's key to the Fastext links. The last two bytes of packet 27/0 also hold a checksum for the whole teletext page. The checksum is not hammed.
Other packet numbers are used to transmit data not related to any particular teletext page. The only one I know about in detail is packet 30, which performs one of two functions, depending on the first data byte. It carries either the Television Service Data Packet (TSDP) or the PDC packet. The format of this packet is described in a separate document, Packet 30 Technical Details.
Packet 31 is used extensively by ITV to carry what is almost certainly commercial data. It comes in two formats, A and B. The format used on ITV is format A, also called ``Didon medium prefix slow mode'' or ``Datacast Format''. Format B is similar, but uses the CRC bytes for error recovery. Format A consists of a variable-length header followed by 28 to 36 bytes of data. The bytes of the header are Hamming protected; the data bytes may be 8 bit or 7 bit with parity. The header always contains a format type (FT) byte followed by a packet address length (AL) byte, then the specified number of bytes of packet address. Following the packet address come two optional bytes, RI and CI. Two flags in the format type byte indicate which (if any) of these optional bytes are present. The packet repeat (RI) byte gives the number of times packet has been retransmitted. The continuity indicator (CI) byte increments for each new packet to the same packet address. Next come the data bytes, followed by a 2-byte CRC which protects CI (if present) and the user data bytes.